const mysql = require('mysql2')

//mysql链接信息
const msg = {
    host:'127.0.0.1',
    user:'用户',
    password:'用户数据库密码',
    database:'数据库名称'
}
//建立链接
const con = mysql.createConnection(msg)
con.connect()
//链接类
class Database {
    constructor(){
        this.mysql = con
    }
}
module.exports = Database